package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 采购需求表
 * 
 * @author sunyan
 * @email sunyan@gmail.com
 * @date 2024-06-13 11:13:52
 */
@Data
@TableName("t_purchase_demand")
public class Demand implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 采购需求ID
	 */
	@TableId(type = IdType.AUTO)
	private Integer demandId;
	/**
	 * 状态：1-申请中；2-已接收；3-已下单
	 */
	private Integer procurementDemandStatusId;
	/**
	 * 类型：销售备货、仓库补货、新品需求
	 */
	private Integer procurementDemandType;
	/**
	 * 需求仓库ID
	 */
	private Integer warehouseId;
	/**
	 * 需求产品ID
	 */
	private Integer productId;
	/**
	 * 需求数量
	 */
	private Integer demandAmount;
	/**
	 * 预计采购单价
	 */
	private double expectedUnitPrice;
	/**
	 * 预计采购总额
	 */
	private double expectedTotalAmount;
	/**
	 * 期望到货日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date expectedArrivalDate;
	/**
	 * 期望供应商ID
	 */
	private Integer expectedSupplierId;
	/**
	 * 需求描述
	 */
	private String description;
	/**
	 * 申请日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date applyDate;
	/**
	 * 申请人
	 */
	private String applicant;
	/**
	 * 创建人
	 */
	private String creator;
	/**
	 * 修改人
	 */
	private String modifier;
	/**
	 * 审批人
	 * */
	private String approver;
	/**
	 * 审批时间
	 * */
	private String approvalTime;
	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**
	 * 修改时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date modifyTime;
	/**
	 * 最后活动时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastActivityTime;

	/**
	 * 字典采购状态
	 */
	@TableField(exist = false)
	private String d1status;

	/**
	 * 字典采购类型
	 */
	@TableField(exist = false)
	private String d2type;

	/**
	 * 组合一个 Warehouse 对象作为自己的属性
	 */
	@TableField(exist = false)
	private Warehouse warehouse;

	/**
	 * 组合一个 Product 对象作为自己的属性
	 */
	@TableField(exist = false)
	private Product product;

	/**
	 * 组合一个 ProcuredSupplier 对象作为自己的属性
	 */
	@TableField(exist = false)
	private ProcuredSupplier supplier;

	public String getApprover() {
		return approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public String getApprovalTime() {
		return approvalTime;
	}

	public void setApprovalTime(String approvalTime) {
		this.approvalTime = approvalTime;
	}

	public ProcuredSupplier getSupplier() {
		return supplier;
	}

	public void setSupplier(ProcuredSupplier supplier) {
		this.supplier = supplier;
	}

	public Integer getDemandId() {
		return demandId;
	}

	public void setDemandId(Integer demandId) {
		this.demandId = demandId;
	}

	public Integer getProcurementDemandStatusId() {
		return procurementDemandStatusId;
	}

	public void setProcurementDemandStatusId(Integer procurementDemandStatusId) {
		this.procurementDemandStatusId = procurementDemandStatusId;
	}

	public Integer getProcurementDemandType() {
		return procurementDemandType;
	}

	public void setProcurementDemandType(Integer procurementDemandType) {
		this.procurementDemandType = procurementDemandType;
	}

	public Integer getWarehouseId() {
		return warehouseId;
	}

	public void setWarehouseId(Integer warehouseId) {
		this.warehouseId = warehouseId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public Integer getDemandAmount() {
		return demandAmount;
	}

	public void setDemandAmount(Integer demandAmount) {
		this.demandAmount = demandAmount;
	}

	public double getExpectedUnitPrice() {
		return expectedUnitPrice;
	}

	public void setExpectedUnitPrice(double expectedUnitPrice) {
		this.expectedUnitPrice = expectedUnitPrice;
	}

	public double getExpectedTotalAmount() {
		return expectedTotalAmount;
	}

	public void setExpectedTotalAmount(double expectedTotalAmount) {
		this.expectedTotalAmount = expectedTotalAmount;
	}

	public Date getExpectedArrivalDate() {
		return expectedArrivalDate;
	}

	public void setExpectedArrivalDate(Date expectedArrivalDate) {
		this.expectedArrivalDate = expectedArrivalDate;
	}

	public Integer getExpectedSupplierId() {
		return expectedSupplierId;
	}

	public void setExpectedSupplierId(Integer expectedSupplierId) {
		this.expectedSupplierId = expectedSupplierId;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getApplyDate() {
		return applyDate;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public String getApplicant() {
		return applicant;
	}

	public void setApplicant(String applicant) {
		this.applicant = applicant;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Date getLastActivityTime() {
		return lastActivityTime;
	}

	public void setLastActivityTime(Date lastActivityTime) {
		this.lastActivityTime = lastActivityTime;
	}

	public String getD1status() {
		return d1status;
	}

	public void setD1status(String d1status) {
		this.d1status = d1status;
	}

	public String getD2type() {
		return d2type;
	}

	public void setD2type(String d2type) {
		this.d2type = d2type;
	}

	public Warehouse getWarehouse() {
		return warehouse;
	}

	public void setWarehouse(Warehouse warehouse) {
		this.warehouse = warehouse;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
}
